const {dialog,MenuItem,app,shell} = require('electron')
const DataStore = require('../../app-store');
const dataStore = new DataStore();
const appLogin = require('../../cookie/app-login');

exports.menu = function (menu, tray) {
    menu.append(new MenuItem({
        label: '访问控制',
        click: function(){
            appLogin.getSiteCookie('http://127.0.0.1:8888/expense/idm/index.html#/user-mgmt', (cookie) => {
                dataStore.setSoloCookies(cookie)
            })
        }
    }))
    menu.append(new MenuItem({
        label: '流程设计',
        click: function(){
            appLogin.getSiteCookie('http://127.0.0.1:8888/expense', (cookie) => {
                dataStore.setSoloCookies(cookie)
            })
        }
    }))
    tray.setTitle('插件')
}
